{extend name='public/modal'}
{block name='content'}
<style type="text/css">
    .submit_btn{
         float: center;
  }
  .domeImg{width: 50%;margin-left: 20%;}
</style>
<form action="add_banner" class="layui-form layui-form-pane" id="mainForm" method="post" enctype="multipart/form-data">

    <form class="form-horizontal" id='addForm' action="add_banner" enctype="multipart/form-data">

                        <div class="layui-upload">
                          <div class="layui-upload-list">
						  <button type="button" class="layui-btn" id="test1">上传图片</button>
                            <img class="layui-upload-img domeImg" id="demo1">
                            <input type="hidden" name="bennerImg" id="bennerImg" value="">
                            <p id="demoText"></p>
                          </div>
                        </div>  

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                URL
                            </label>
                            <div class="layui-input-block">
                                 <input type="text" name="url"  class="layui-input" id="url" placeholder="格式：http://www.xxxx.com">
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                备注
                            </label>
                            <div class="layui-input-block">
                                  <input type="text" name="describe" class="layui-input" id="describe" placeholder="备注">
                            </div>
                        </div>


                         <div class="layui-form-item">
                            <label class="layui-form-label">
                                位置
                            </label>
                            <div class="layui-input-block">
								<input type="radio" name="flg" value="1" title="首页" checked>
                                <input type="radio" name="flg" value="2" title="入口">
								<input type="radio" name="flg" value="3" title="其他">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                状态
                            </label>
                            <div class="layui-input-block">
							    <input type="radio" name="status" value="1" title="启用" checked>
								<input type="radio" name="status" value="0" title="禁用">
                            </div>
                        </div>
                </div>

            <div class="layui-form-item">
                <div class="layui-input-block submit_btn">
                    <input id="addReset" type="reset" style="display: none" value="这个是Form清除" />
                    <button type="submit" class="layui-btn layui-btn-success">保存</button>
                </div>
            </div>
</form>
{/block}
{block name='js'}
<script type="text/javascript">
$(function(){
	w_ajaxSubmit($('#mainForm'))
	w_uplode('#test1','#demo1','/admin/banner/upload','img','#bennerImg');
});
</script>
{/block}
